<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head th:fragment="head">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Bookstore</title>
    <link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.3.2/css/bootstrap.min.css">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
</head>
<body id="body">
<header class="container-fluid" th:fragment="navbar">
<!--    <nav class="navbar navbar-expand-sm bg-dark navbar-dark">-->
<!--        &lt;!&ndash; Brand/logo &ndash;&gt;-->
<!--        <div class="row"></div>-->
<!--        <a class="navbar-brand" th:href="@{/}">MyBookstore</a>-->

<!--               &lt;!&ndash; Links &ndash;&gt;-->
<!--        <ul class="navbar-nav col-md-2 offset-md-10" >-->
<!--            <li class="nav-item">-->
<!--                <a class="nav-link" th:href="@{/registration}">注册</a>-->
<!--            </li>-->
<!--            <li class="nav-item">-->
<!--                <a class="nav-link" th:href="@{/login}">登录</a>-->
<!--            </li>-->
<!--        </ul>-->
<!--    </nav>-->
    <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
        <div class="container">
            <a class="navbar-brand" th:href="@{/}">
                MyBookstore
            </a>
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarNav">
                <form class="d-flex ms-auto" method="get" action="/search">
                    <input class="form-control me-2" type="search" placeholder="图书查询..." aria-label="Search" name="Search">
                    <button class="btn btn-outline-secondary" type="submit">Search</button>
                </form>
                <ul class="navbar-nav  offset-md-1">
                    <li class="nav-item">
                        <a class="nav-link" th:href="@{/registration}">注册</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link"  th:href="@{/login}">登录</a>
                    </li>
                </ul>
            </div>
        </div>
    </nav>
</header>
</body>

</html>